import java.util.Scanner;

public class LoginPassword {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        String n = "0";
        String right = "1346";

        for (int i = 0; i < 3; i++) {
            n = scan.next();

            if (n.equals(right)) {
                System.out.println("登陆成功");
                break;
            } else {
                System.out.println("密码错误，重新输入");
            }

            if (i == 2) {
                System.out.println("次数用完，退出程序");
            }
        }
    }
}
